/*
 * @Description: 加载中效果
 * @Author: ZhangHan
 * @Date: 2025-07-25 10:10:15
 * @LastEditTime: 2025-07-25 11:09:04
 * @LastEditors: ZhangHan
 */
import { type Optional } from "@/types/utils";

export function useLoading() {
  function show(Option?: Optional<UniApp.ShowLoadingOptions, "title">) {
    uni.showLoading({ ...Option, title: "加载中" });
  }

  function hide() {
    uni.hideLoading();
  }

  return [show, hide];
}
